cmake_minimum_required(VERSION 3.8.1)
project("native-lib")

add_library( # 编译动态库
        native-lib
        SHARED
        native-lib.cpp)

# 链接 QuickJS 的 .so 文件
add_library(quickjs SHARED IMPORTED)
set_target_properties(quickjs PROPERTIES IMPORTED_LOCATION
        ${CMAKE_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libQuickJS.so)

target_link_libraries( # 链接库
        native-lib
        quickjs
        log)  # log 是 Android 的日志库